﻿<Router AppAssembly="typeof(App).Assembly" AdditionalAssemblies="ModuleProvider.AssembliesWithPages">
    <Found Context="routeData">
        <AuthorizeRouteView RouteData="@routeData" DefaultLayout="typeof(MainLayout)">
            <Authorizing>
                <AuthorizingInProgress />
            </Authorizing>
            <NotAuthorized>
                @if (!context.User.Identity.IsAuthenticated)
                {
                    <RedirectToLogin />
                }
                else
                {
                    <UserNotAuthorized />
                }
            </NotAuthorized>
        </AuthorizeRouteView>
    </Found>
    <NotFound>
        <CascadingAuthenticationState>
            <PageNotFound />
        </CascadingAuthenticationState>
    </NotFound>
</Router>
<MatToastContainer />

@code
{
}